Close

General Operation Statement

Syntax samples

CLOSE <file ID>

CLOSE Arrival_File

Description

Closes a file that has previously been written to with WRITE, WRITELINE, XWRITE, or read with READ. Use CLOSE when finished with a file to free system resources. A file will automatically be re-opened to be read or written if it has been closed. All opened files are automatically closed at the end of a simulation. When you are using many external files and you want to conserve system resources, this statement is especially helpful.

Valid In

Any logic.

Components

<file ID>

The file ID of the desired file as defined in the External Files editor.

See Also

READ, WRITE, WRITELINE, XWRITE, and RESET.